//
//  UILabel+Extension.m
//  weibo
//
//  Created by qiuming on 15/12/23.
//  Copyright © 2015年 qiuming. All rights reserved.
//

#import "UILabel+Extension.h"

@implementation UILabel (Extension)

+ (instancetype)labelWithText:(NSString *)text textColor:(UIColor *)textColor textFont:(CGFloat)textFont {
    UILabel *label = [[UILabel alloc]init];
    [label setText:text];
    [label setTextColor:textColor];
//    [label setTextAlignment:NSTextAlignmentCenter];
    [label setFont:[UIFont systemFontOfSize:textFont]];
    label.numberOfLines = 0;
    [label sizeToFit];
    
    return label;
}

+ (instancetype)labelWithText:(NSString *)text textColor:(UIColor *)textColor textFont:(CGFloat)textFont textAlignment:(NSTextAlignment)alignment {
    
    UILabel *label = [UILabel labelWithText:text textColor:textColor textFont:textFont];
    label.textAlignment = alignment;
    
    return label;
}

@end
